/*
 * @Description: 
 * @Author: liuzl
 * @Date: 2024-09-30 10:31:45
 * @LastEditors: liuzl
 * @LastEditTime: 2024-09-30 10:31:45
 */
public class Student {
    private String name;
    private int age;
    public Student(){

    }
    public Student(String name,int age){
        this.name = name;
        this.age = age;
    }
    //重写toString方法
    @Override
    public String toString() {
        return"Student{name:"+name+",agr:"+age+"}";
    }
    public int getAge(){
        return age;
    }
    public String getName(){
        return name;
    }
    // // 重写equals方法
    // @Override
    // public boolean equals(Object obj) {
    //     if (this == obj)
    //     return true;
    //     if (obj == null)
    //     return false;
    //     if (getClass() != obj.getClass())
    //     return false;
    //     Student other = (Student) obj;
    //     if (age != other.age)
    //     return false;
    //     if (name == null) {
    //     if (other.name != null)
    //         return false;
    //     } else if (!name.equals(other.name))
    //     return false;
    //     return true;
    //}
    
}